<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/UI/Resource/image_source.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_c78dc1806c68fd338fba226975244931.html">UI</a></li><li class="navelem"><a class="el" href="dir_7c86a8dfeb4ecb1903ae154e0f5e8956.html">Resource</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">image_source.c</div></div>
</div><!--header-->
<div class="contents">
<a href="image__source_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="image__source_8h.html">image_source.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="image__source_8c.html#aad0609e68f74eb0a9760a3fc0f604794">   25</a></span><a class="code hl_struct" href="structimg__hash__t.html">img_hash_t</a> <a class="code hl_variable" href="image__source_8c.html#aad0609e68f74eb0a9760a3fc0f604794">Image_Table</a>[<a class="code hl_define" href="image__source_8h.html#adaf395a1fb2006af232e8538dcd7a854">IMG_MAX_NUM</a>];</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="image__source_8c.html#a51099c440ab911ba95dabfa686eeca93">   28</a></span><span class="keyword">static</span> lv_img_dsc_t <a class="code hl_variable" href="image__source_8c.html#a51099c440ab911ba95dabfa686eeca93">LVGL_Private_Custom_Image_Table</a>[<a class="code hl_define" href="image__source_8h.html#adaf395a1fb2006af232e8538dcd7a854">IMG_MAX_NUM</a>];</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="image__source_8c.html#a885e4f4c4d55a588752ae7411cf4daa8">   37</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="image__source_8c.html#a885e4f4c4d55a588752ae7411cf4daa8">img_table_hash_init</a>(<a class="code hl_struct" href="structimg__hash__t.html">img_hash_t</a> *table, uint32_t table_size)</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>{</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>    <span class="comment">/* 按顺序映射, 用户也可自由变更设定 ( File_Table[i] &lt;=&gt; lv_img_dsc_t_table[j] )</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="comment">     * 例如原先将 &quot;1.jpg&quot; 映射至 &quot;lv_img_dsc_t_table[1]&quot; 后变更为 &quot;1.jpg&quot; 映射至 &quot;lv_img_dsc_t_table[2]&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment">     */</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; table_size; ++i)</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>    {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        table[i].<a class="code hl_variable" href="structimg__hash__t.html#a5be3dd4ebfa388f80036fee2ac2768f1">file</a> = &amp;<a class="code hl_variable" href="file__table_8c.html#a210f9e081ee07b322afeec966766b06a">File_Table</a>.<a class="code hl_variable" href="structtable__class__t.html#a5be3dd4ebfa388f80036fee2ac2768f1">file</a>[<a class="code hl_define" href="file__table_8h.html#a53bd581d915222e8bcbd0f453dcc60ef">FT_IMG_START</a> + i];</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>        table[i].<a class="code hl_variable" href="structimg__hash__t.html#a15a9da58fa9768c427dbd548764b2009">img</a> = &amp;<a class="code hl_variable" href="image__source_8c.html#a51099c440ab911ba95dabfa686eeca93">LVGL_Private_Custom_Image_Table</a>[i];</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    }</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>}</div>
<div class="ttc" id="afile__table_8c_html_a210f9e081ee07b322afeec966766b06a"><div class="ttname"><a href="file__table_8c.html#a210f9e081ee07b322afeec966766b06a">File_Table</a></div><div class="ttdeci">table_class_t File_Table</div><div class="ttdoc">文件表</div><div class="ttdef"><b>Definition:</b> <a href="file__table_8c_source.html#l00296">file_table.c:296</a></div></div>
<div class="ttc" id="afile__table_8h_html_a53bd581d915222e8bcbd0f453dcc60ef"><div class="ttname"><a href="file__table_8h.html#a53bd581d915222e8bcbd0f453dcc60ef">FT_IMG_START</a></div><div class="ttdeci">#define FT_IMG_START</div><div class="ttdoc">图片文件位于表中的起始索引</div><div class="ttdef"><b>Definition:</b> <a href="file__table_8h_source.html#l00057">file_table.h:57</a></div></div>
<div class="ttc" id="aimage__source_8c_html_a51099c440ab911ba95dabfa686eeca93"><div class="ttname"><a href="image__source_8c.html#a51099c440ab911ba95dabfa686eeca93">LVGL_Private_Custom_Image_Table</a></div><div class="ttdeci">static lv_img_dsc_t LVGL_Private_Custom_Image_Table[IMG_MAX_NUM]</div><div class="ttdoc">(可自定义) lv_img_dsc_t 表</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8c_source.html#l00028">image_source.c:28</a></div></div>
<div class="ttc" id="aimage__source_8c_html_a885e4f4c4d55a588752ae7411cf4daa8"><div class="ttname"><a href="image__source_8c.html#a885e4f4c4d55a588752ae7411cf4daa8">img_table_hash_init</a></div><div class="ttdeci">void img_table_hash_init(img_hash_t *table, uint32_t table_size)</div><div class="ttdoc">初始化 图片资源文件映射表</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8c_source.html#l00037">image_source.c:37</a></div></div>
<div class="ttc" id="aimage__source_8c_html_aad0609e68f74eb0a9760a3fc0f604794"><div class="ttname"><a href="image__source_8c.html#aad0609e68f74eb0a9760a3fc0f604794">Image_Table</a></div><div class="ttdeci">img_hash_t Image_Table[IMG_MAX_NUM]</div><div class="ttdoc">图片资源文件映射表</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8c_source.html#l00025">image_source.c:25</a></div></div>
<div class="ttc" id="aimage__source_8h_html"><div class="ttname"><a href="image__source_8h.html">image_source.h</a></div><div class="ttdoc">管理加载至 SDRAM 的图片资源(即 lv_img_dsc_t 结构体)</div></div>
<div class="ttc" id="aimage__source_8h_html_adaf395a1fb2006af232e8538dcd7a854"><div class="ttname"><a href="image__source_8h.html#adaf395a1fb2006af232e8538dcd7a854">IMG_MAX_NUM</a></div><div class="ttdeci">#define IMG_MAX_NUM</div><div class="ttdoc">UI 图片素材总数 ( 理论应与 FT_IMG_NUM 一致 )</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8h_source.html#l00085">image_source.h:85</a></div></div>
<div class="ttc" id="astructimg__hash__t_html"><div class="ttname"><a href="structimg__hash__t.html">img_hash_t</a></div><div class="ttdef"><b>Definition:</b> <a href="image__source_8h_source.html#l00090">image_source.h:91</a></div></div>
<div class="ttc" id="astructimg__hash__t_html_a15a9da58fa9768c427dbd548764b2009"><div class="ttname"><a href="structimg__hash__t.html#a15a9da58fa9768c427dbd548764b2009">img_hash_t::img</a></div><div class="ttdeci">lv_img_dsc_t * img</div><div class="ttdoc">图片资源</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8h_source.html#l00092">image_source.h:92</a></div></div>
<div class="ttc" id="astructimg__hash__t_html_a5be3dd4ebfa388f80036fee2ac2768f1"><div class="ttname"><a href="structimg__hash__t.html#a5be3dd4ebfa388f80036fee2ac2768f1">img_hash_t::file</a></div><div class="ttdeci">user_file_t * file</div><div class="ttdoc">文件</div><div class="ttdef"><b>Definition:</b> <a href="image__source_8h_source.html#l00093">image_source.h:93</a></div></div>
<div class="ttc" id="astructtable__class__t_html_a5be3dd4ebfa388f80036fee2ac2768f1"><div class="ttname"><a href="structtable__class__t.html#a5be3dd4ebfa388f80036fee2ac2768f1">table_class_t::file</a></div><div class="ttdeci">user_file_t * file</div><div class="ttdoc">文件</div><div class="ttdef"><b>Definition:</b> <a href="file__table_8h_source.html#l00074">file_table.h:74</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
